#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QtGui>
#include <QMessageBox>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    int WindowHeight;
    int WindowWidth;
    QRect Feld[8][8];
    int startx,starty;
    int endx, endy;

    struct SFeld
    {
        int art;
        int color;
        bool possible;
        bool dead;
    };

    bool Zug;
    SFeld FeldFig[8][8];
    ~MainWindow();


    void Zug_meoglich(int Figur, int x, int y);
    bool Gegner(int color, int fx, int fy);
    bool Matt(int color);
    bool KoenigMatt(int color); // Nicht vollständig
    
private:
    Ui::MainWindow *ui;
    QPoint m_clickPoint;	

protected:
    void paintEvent(QPaintEvent *);
    void mouseRelease(QMouseEvent *);
    void mousePressEvent(QMouseEvent * event);
    void Berechnen(int x, int y);
    char UmwandelnX(int zahl);
    int  UmwandelnY(int zahl);

private slots:
    void InfoBox();
    void HelpBox();

};

#endif // MAINWINDOW_H
